package lambda;

import java.io.File;
import java.io.FileFilter;

/**
 * JDK8之后退出的新特性
 * */
public class LambdaDemo {
    public static void main(String[] args) {
        FileFilter filter = new FileFilter() {
            @Override
            public boolean accept(File pathname) {
                return pathname.getName().endsWith("txt");
            }
        };

        //lambda表达式
        FileFilter filter1 = (File pathname) -> {
                return pathname.getName().endsWith("txt");
        };
    }
}
